#!/user/bin/python
# -*- coding: utf-8 -*-
'''
 @Time    : 2018/5/23 20:35
 @File    : msg.py
 @desc    :
'''
from commonSpiders.net.message.socketio_msg import Failure, Success
from commonSpiders.utils.server_utils import get_mac_address

mac = get_mac_address()


class CreeperSuccessMsg(Success):

    def __init__(self, manager_guid='', data='', msg=''):
        super(CreeperSuccessMsg, self).__init__(data=data, msg=msg)
        self.update({
            'mac': mac,
            'manager_guid': manager_guid
        })


class CreeperFailure(Failure):

    def __init__(self, manager_guid='', error=''):
        super(CreeperFailure, self).__init__(error=error)
        self.update({
            'mac': mac,
            'manager_guid': manager_guid
        })

